package com.algorithm.code.stream;

import java.util.Arrays;
import java.util.stream.IntStream;
import java.util.stream.Stream;

/**
 * @program: study
 * @className: StreamTest
 * @description: TODO
 * @author: kukuxiahuni
 * @create: 2020-02-16 20:12
 **/
public class StreamTest {

    /**
     * @method: 创建流
     * @param:
     * @return:
     * @author: kukuxiahuni
     * @create: 2020/2/16 20:12
     * @modify_user:TODO
     * @modify_time: 2020/2/16 20:12
     **/
    public void createStream() {

        Stream<Integer> integerStream = Stream.of(1, 2, 3);

        IntStream intStream = Arrays.stream(new int[]{1, 2, 3});

        intStream = integerStream.mapToInt(Integer::intValue);
        integerStream = intStream.boxed();

        intStream = IntStream.of(1, 2, 3);
        IntStream.builder().add(1).add(2).build();



    }
}
